<template>
  <div class="header wrap">
    <h1><img  width="300px" src="@/assets/img/商城logo.png" alt=""></h1>
    <ul class="nav">
      <li :class="$route.path=='/home'?'active':''" @click="$router.push('/home')">首页</li>
      <li :class="$route.path=='/goods'?'active':''" @click="$router.push('/goods')">全部商品</li>
      <li :class="$route.path=='/user'?'active':''" @click="$router.push('/user')">个人中心</li>
      <!-- <li :class="$route.path=='/order'?'active':''" @click="$router.push('/order')">我的订单</li>
      <li :class="$route.path=='/free'?'active':''" @click="$router.push('/free')">专属福利</li> -->
    </ul>
    <div class="search">
      <input type="text" placeholder="请输入您想搜索的商品">
      <span><i class="el-icon-search"></i></span>
    </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
        }
    }
}
</script>

<style lang="less" scoped>
@import "../assets/css/global.less";
.header{
  height: 118px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .nav{
    display: flex;
    width: 500px;
    justify-content: space-between;

    li{
      cursor: pointer;
      &.active{
        color: @base-color;
        font-weight: bold;
      }
    }
  }

  .search{
    display: flex;
    input{
      width: 214px;
      height: 38px;
      border: 1px solid rgb(0, 0, 0);
      border-radius: 20px 0px 0px 20px;
      text-indent: 12px;
    }
    span{
      width: 50px;
      height: 40px;
      background-color: @base-color;
      border-radius: 0px 20px 20px 0px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      .el-icon-search{
        margin: auto;
        font-size: 20px;
        color:rgb(255, 255, 255);
      }
    }
  }
}
</style>